import { ADD, DELETE, CHANGE, SET_USER, CLEAR_USER } from './actionType'

// 定义 action
export const addTodo = (todo) => ({ type: ADD, payload: todo })
export const deleteTodo = (id) => ({ type: DELETE, payload: id })
export const changeTodo = (id) => ({ type: CHANGE, payload: id })
export const setUser = (user) => ({ type: SET_USER, payload: user })
export const clearUser = () => ({ type: CLEAR_USER })

